 <!DOCTYPE html>
<html>
<!--Made By kailuosoft.com, TEL 171 9992 9517 -->
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>凯络科技后台管理系统</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico"> <link href="__PUBLIC__/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="__PUBLIC__/css/animate.min.css" rel="stylesheet">
    <link href="__PUBLIC__/css/style.min862f.css?v=4.1.0" rel="stylesheet">
	<link href="__PUBLIC__/css/page.css" rel="stylesheet">
    <link href="__PUBLIC__/css/new.css" rel="stylesheet">
	
	<script src="__PUBLIC__/js/jquery.min63b9.js?v=2.1.4"></script>
    <script src="__PUBLIC__/js/plugins/layer/layer.min.js"></script>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
	.yangshi{
		background:#18a689;
		color:#FFF;
	}

</style>
   
		

</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
         
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>运费模板</h5>
                        
                    </div>
                    <div class="ibox-content">
					
                        
                        <div class="row">
                        	<div class="col-sm-2">
                            	<div style=" height:600px; overflow:auto; margin-bottom:20px;">
                            	 <table class="table table-bordered table-striped table-hover" style="width:100%">
                                 	<thead class="fix">
                                    	<tr>
                                        	<td><h3>快递单模板列表</h3></td>
                                        </tr>
                                    </thead>
                                    <tbody id="scroll">
                                        <foreach name='print_template' item='val'>
                                            <tr>
                                            <?php if($val['id'] == 1){ ?>
                                                <td class="hehe yangshi" region_id="{$val['id']}">{$val['name']}</td>
                                             <?php }else{ ?>
                                             	 <td class='hehe' region_id="{$val['id']}">{$val['name']}</td>
                                             <?php } ?>
                                            </tr>
                                        </foreach>
                                    </tbody>
                                 </table>
                                </div>
                            </div>
                        	<div class="col-sm-10"> 
                            	 <form action="{:U('muban_add')}" method='post' id='goodsform'>
                            	<div style=" height:600px; overflow:auto; margin-bottom:20px;">
                              	<input type='hidden' name='print_name' id="print_name" value='' />
                                <input type='hidden' name='print_id' id="print_id" value='' />
                                <table class="table table-bordered table-striped table-hover" style="width:100%">
                                    <thead >
                                        <tr>
                                        	<th colspan="4">设置<font color="#FF0000" id='kuaidi_name'></font>到各个省的运费</th>
                                        </tr>
                                        <tr>
                                            <th class="sort-column name">目的地</th>
                                            <th class="sort-column name">首重（公斤）</th>
                                            <th class="sort-column name">首重运费</th>
                                            <th class="sort-column name">续重运费</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <foreach name="region" item="val" >
                                        <tr id="{$val.region_name}" class='diqu'>
                                            <td class='edit' nameval='province' width='10%'>{$val.region_name}</td>
                                            <td class='edit' nameval='city' width='10%' align="center"><input print_id = "{$val.id}" type="text" name="diqu[{$val['region_name']}][shouzhong]"  class="input-sm form-control no shouzhong" value='{$data.province}' style="text-align:center;"></td>
                                            <td class='edit' nameval='district'  width='10%'><input type="text" name="diqu[{$val['region_name']}][shoufei]" class="input-sm form-control no shoufei" value='{$data.province}' style="text-align:center;"></td>
                                            <td class='edit' nameval='town'  width='10%'><input type="text" name="diqu[{$val['region_name']}][xufei]" class="input-sm form-control no xufei" value='{$data.province}' style="text-align:center;"></td>
                                        </tr>
                                        </foreach>
                                    </tbody>
                                </table>
                                 
                              
                                </div>  
                                <div> <button type="sumbit" class="btn btn-sm btn-primary" id='add' style=" float:right; margin-right:50px; width:200px;"> 保存设置</button> </div>
                                </form>
                        	</div>
                            
                        </div>


                    </div>
                </div>
            </div>
             
        </div>
         
    </div>
    <script src="__PUBLIC__/js/jquery.min63b9.js?v=2.1.4"></script>
    <script src="__PUBLIC__/js/bootstrap.min14ed.js?v=3.3.6"></script>
    <script src="__PUBLIC__/js/plugins/peity/jquery.peity.min.js"></script>
    <script src="__PUBLIC__/js/content.mine209.js?v=1.0.0"></script>
    <script src="__PUBLIC__/js/plugins/iCheck/icheck.min.js"></script>
    <script src="__PUBLIC__/js/demo/peity-demo.min.js"></script>
	<script src="__PUBLIC__/js/plugins/layer/laydate/laydate.js"></script>
	 

    <script>
       $(".hehe").click(function(){
			$(".hehe").removeClass("yangshi");
			$(this).addClass("yangshi");
			var kuaidi = $('.yangshi').html();
			var id = $('.yangshi').attr('region_id');
			$('#kuaidi_name').html(kuaidi);	
			$('#print_name').val(kuaidi);
			$('#print_id').val(id);
			$.ajax({
				type:"GET",
				url: "{:U('region_find')}",
				data:"id="+id+"&name="+kuaidi,
				dataType: "json",
             	success: function(data){
					if(data['msg'] == 'success'){
						$('.diqu').each(function(){
							id=$(this).attr('id');
							
							$(this).find('.shouzhong').val(data['diqu'][id]['shouzhong']);
							$(this).find('.shoufei').val(data['diqu'][id]['shoufei']);
							$(this).find('.xufei').val(data['diqu'][id]['xufei']);
							
						})
						
					}else{
						$('.no').val('');	
					}
				}
			})
		})
		
		$(function(){
			var kuaidi = $('.yangshi').html();
			var id = $('.yangshi').attr('region_id');
			$('#kuaidi_name').html(kuaidi);
			$('#print_name').val(kuaidi);
			$('#print_id').val(id);
			
			$.ajax({
				type:"GET",
				url: "{:U('region_find')}",
				data:"id="+id+"&name="+kuaidi,
				dataType: "json",
             	success: function(data){
					if(data['msg'] == 'success'){
						$('.diqu').each(function(){
							id=$(this).attr('id');
							
							$(this).find('.shouzhong').val(data['diqu'][id]['shouzhong']);
							$(this).find('.shoufei').val(data['diqu'][id]['shoufei']);
							$(this).find('.xufei').val(data['diqu'][id]['xufei']);
							
						})
						
					}else{
						$('.no').val('');	
					}
				}
			})
			
		})
    </script>
    <div style="display:none"><script language="javascript" type="text/javascript" src="http://js.users.51.la/17825721.js"></script>
<noscript><a href="http://www.51.la/?17825721" target="_blank"><img alt="&#x6211;&#x8981;&#x5566;&#x514D;&#x8D39;&#x7EDF;&#x8BA1;" src="http://img.users.51.la/17825721.asp" style="border:none" /></a></noscript></div>
</body>
<!--Made By kailuosoft.com, TEL 171 9992 9517 -->
<script  type="text/javascript"  src="http://g.tbcdn.cn/sj/securesdk/0.0.3/securesdk_v2.js"  id="J_secure_sdk_v2" data-appkey="23416550"></script>
</html>
